package com.qf.mapper;

import com.qf.pojo.Category;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface CategoryMapper {

    @Select("select * from categories")
    List<Category> findAllCategory();

    @Insert("insert into categories(categoryname) value(#{categoryName})")
    void  addCategory(@Param("categoryName") String categoryName);
}
